<?php
class modules_default_forms_UserForm extends forms_FormBase
{
	/**
	 * Init
	 * @see Zend/Zend_Form#init()
	 */
	public function init()
	{

		$oEmailElement = new Zend_Form_Element_Text('email');
		$oEmailElement = $this->_initDefaultFiltersAndValidators($oEmailElement);
		$oEmailElement->addValidator(new Zend_Validate_EmailAddress())
		              ->addValidator(new Zend_Validate_Db_NoRecordExists('user', 'email'));
		$this->addElement($oEmailElement);

		$oRoleElement = new Zend_Form_Element_Text('role');
		$oRoleElement = $this->_initDefaultFiltersAndValidators($oRoleElement);
		$this->addElement($oRoleElement);

		$oStatusElement = new Zend_Form_Element_Text('status');
		$oStatusElement = $this->_initDefaultFiltersAndValidators($oStatusElement);
		$this->addElement($oStatusElement);
		
		$oPasswordElement = new Zend_Form_Element_Password('password');
		$oPasswordElement->setRequired(true);
		$this->addElement($oPasswordElement);

		
//		$oRegistrationDatetimeElement = new Zend_Form_Element_Text('registration_datetime');
//		$oRegistrationDatetimeElement = $this->_initDefaultFiltersAndValidators($oRegistrationDatetimeElement);
//		$oRegistrationDatetimeElement->addValidator(new Zend_Validate_Date('YYYY-MM-DD hh:mm'));
//		$this->addElement($oRegistrationDatetimeElement);
		
//		$oAccountTypeElement = new Zend_Form_Element_Text('account_type');
//		$oAccountTypeElement = $this->_initDefaultFiltersAndValidators($oAccountTypeElement);
//		$this->addElement($oAccountTypeElement);

		


	}
}